import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

export const routes = [
  {
    path: "/",
    name: "Login",
    component: () => import("../views/Login.vue"),
  },
  {
    path: "/home",
    name: "Home",
    component: () => import("../views/Home.vue"),
    redirect: "/welcome",
    children: [
      {
        path: "/welcome",
        component: () => import("@/views/Welcome.vue"),
      },
      {
        path: "/jobSetting",
        component: () => import("@/views/activityManage/jobSetting.vue"),
      },

      {
        path: "/addActivity",
        name: "addActivity",

        component: () => import("@/views/activityManage/activityAdd.vue"),
      },
      {
        path: "/activityAsk",
        component: () => import("@/views/activityManage/activityAsk.vue"),
      },
      {
        path: "/activitySign",
        component: () => import("@/views/activityManage/activitySign"),
      },
      {
        path: "/activityList",
        component: () => import("@/views/activityManage/activityList.vue"),
      },
      {
        path: "/activityLeaveAudit",
        component: () => import("@/views/activityManage/activityLeaveAudit.vue"),
      },
      {
        path: "/activityLeaveList",
        component: () => import("@/views/activityManage/activityLeaveList.vue"),
      },
      {
        path: "/addArticle",
        name: "addArticle",
        component: () => import("@/views/articleManage/articleAdd.vue"),
      },
      {
        path: "/articleAsk",
        component: () => import("@/views/articleManage/articleAsk.vue"),
      },
      {
        path: "/articleList",
        component: () => import("@/views/articleManage/articleList.vue"),
      },

      {
        path: "/bannerList",
        component: () => import("@/views/articleManage/bannerList.vue"),
      },

      {
        path: "/addVote",
        component: () => import("@/views/voteManage/addVote.vue"),
      },
      {
        path: "/voteList",
        component: () => import("@/views/voteManage/voteList.vue"),
      },
      {
        path: "/communityList",
        component: () => import("@/views/communityManage/communityList.vue"),
      },
      {
        path: "/addCommunity",
        component: () => import("@/views/communityManage/communityAdd.vue"),
      },

      {
        path: "/volunteerList",
        component: () => import("@/views/volunteerManage/volunteerList.vue"),
      },
      {
        path: "/blackVolunteer",
        component: () => import("@/views/volunteerManage/blackVolunteer.vue"),
      },
      {
        path: "/volunteerScore",
        component: () => import("@/views/volunteerManage/volunteerScore.vue"),
      },
      {
        path: "/addTeacher",
        component: () =>
          import("@/views/courseManage/teacherManage/AddTeacher.vue"),
      },
      {
        path: "/teacherManage",
        component: () =>
          import("@/views/courseManage/teacherManage/TeacherList.vue"),
      },
      {
        path: "/addCourse",
        component: () => import("@/views/courseManage/courseAdd.vue"),
      },
      {
        path: "/arrangeCourse",
        component: () => import("@/views/courseManage/arrangeCourse.vue"),
      },
      {
        path: "/courseSign",
        component: () => import("@/views/courseManage/courseSign.vue"),
      },

      {
        path: "/courseList",
        component: () => import("@/views/courseManage/courseList.vue"),
      },
      {
        path: "/courseLeaveAudit",
        component: () => import("@/views/courseManage/courseLeaveAudit.vue"),
      },
      {
        path: "/courseLeaveList",
        component: () => import("@/views/courseManage/courseLeaveList.vue"),
      },

      {
        path: "/addCommodity",
        component: () => import("@/views/commodityManage/commodityAdd.vue"),
      },
      {
        path: "/commodityList",
        component: () => import("@/views/commodityManage/commodityList.vue"),
      },

      {
        path: "/addManage",
        component: () => import("@/views/settingManage/addManage.vue"),
      },
      {
        path: "/managerList",
        component: () => import("@/views/settingManage/managerList.vue"),
      },
      {
        path: "/activityleaveList",
        component: () => import("@/views/activityManage/activityLeaveList.vue"),
      },

      {
        path: "/familyList",
        component: () => import("@/views/volunteerManage/familyList.vue"),
      }, {
        path: "/orderManager",
        component: () => import("@/views/orderManager/orderManager.vue"),
      }, {
        path: "/orderStatistic",
        component: () => import("@/views/orderManager/orderStatistic.vue"),
      }, {
        path: "/allTypeOrder",
        component: () => import("@/views/orderManager/allTypeOrder.vue"),
      }, {
        path: "/giftsOrderList",
        component: () => import("@/views/commodityManage/giftsOrderList.vue"),
      }, {
        path: "/goodsOrderList",
        component: () => import("@/views/commodityManage/goodsOrderList.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  routes,
});

export default router;
